﻿<%@ Control Language="C#" %>
<script runat="server">
    private int lang = 1;
    private int obj_typ = 2;
    private string key = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Item_Lang == 1)
            Item_Lang = Utils.GetQueryString("lang", 1);
        if (Obj_Typ == 2)
            Obj_Typ = Utils.GetQueryString("t", 2);
        if (Key != null)
            Key = Utils.GetQueryString("q", "");
        Product pro = new Product();

        Repeater_List.DataSource = pro.List_Search(Obj_Typ, Key, Item_Lang);
        Repeater_List.DataBind();
    }
    public int Item_Lang
    {
        get { return lang; }
        set { lang = value; }
    }
    /// <summary>
    /// 搜索对象类型，1新闻2产品等，更多选项打开 “开发文档\文件类型.txt”文件。
    /// </summary>
    public int Obj_Typ
    {
        get { return obj_typ; }
        set { obj_typ = value; }
    }

    public string Key
    {
        get { return key; }
        set { key = value; }
    }   
</script>
<div class="layout">
    <div class="layout">
        <div id="Search_Layout">
            <span><%=Lang.Show("EnterKeywords")%></span>
            <input type="text" id="S_Text" value="<%=Utils.GetQueryString("q","") %>">
            <button onclick="Search()"><%=Lang.Show("Search")%></button>
        </div>
    </div>
</div>
<div class="ch10"></div>
<div class="layout">
    <div>
        <h5><q> <%=Request.QueryString["q"].ToString() %> </q><%=Lang.Show("SearchResultsAreAsFollows")%></h5>
        <div class="ch10"></div>
        <div id="Product">
            <div id="Product_List">
                <div class="list">
                    <asp:Repeater runat="server" ID="Repeater_List">
                        <ItemTemplate>
                            <a href="/home/Product.View.aspx?id=<%#Eval("Item_Id") %>">
                                <img alt="<%#Eval("Item_Name") %>" src="../DataFile/Product/<%#Eval("Create_Time","{0:yyyyMM}") %>_<%#Eval("Item_Img") %>_s.jpg" /><span><%#Eval("Item_Name") %></span>
                                <i><%=Lang.Show("Item_Price")%>: <b><%#Eval("Item_Price") %></b> <%=Lang.Show("RMB")%></i>
                                <ul><li><%=Lang.Show("Detailed")%></li><li><%=Lang.Show("Forwarding")%></li></ul>
                                <div class="ch10"></div>
                                <u><%=Lang.Show("Order")%></u>
                            </a>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <div class="ch20">
                </div>
            </div>
        </div>
    </div>
</div>
